home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / editor / frexxed / fpl / showchanged.fpl < prev    next >
Text File  |  1995-07-18  |  690b  |  31 lines

  1. export int ShowAllChanged()  /* Show all changed buffers */
  2. {
  3.   int firstid=GetBufferID();
  4.   int id=firstid;
  5.   string files[ReadInfo("buffers")];
  6.   int count=0;
  7.   string togoto="";
  8.  
  9.   do {
  10.     if (ReadInfo("changes", id))
  11.       files[count++]=ReadInfo("file_name", id);
  12.     id=NextBuffer(id);
  13.     if (id == firstid)
  14.       id=0;
  15.   } while (id);
  16.  
  17.   if (count) {
  18.     Sort(&files, count);
  19.     RequestWindow("Changed files", "", "A", &files, &togoto, count);
  20.     if (strlen(togoto)) {
  21.       id=GetBufferID(togoto);
  22.       if (id) {
  23.         CurrentBuffer(id);
  24.         Activate(id);
  25.       }
  26.     }
  27.   } else
  28.     ReturnStatus("No files changed!");
  29. }
  30. AssignKey("ShowAllChanged();", "Amiga Control c");
  31.